import uniRouter from "@/tool/router/uni-router"

export const __DEF_IMG = 'https://img2.baidu.com/it/u=2202945487,2887905379&fm=253&fmt=auto&app=138&f=JPEG?w=8000&h=10670'
export const __DEF_AVATAR = 'https://pic.rmb.bdstatic.com/bjh/240819/9081512ab23871e59043f0f81fc8252b1095.jpeg'

export const APP_GENERATE_DETAIL = <AppInfo>{
    logo: __DEF_AVATAR,
    // 'https://img2.baidu.com/it/u=1882819932,1177030922&fm=253&fmt=auto&app=120&f=JPEG?w=655&h=655',
    desc: '找派对 上约会圈',
    name: '约会圈',
    logoLogin: __DEF_AVATAR,
    // 'https://img1.baidu.com/it/u=1178382764,329077325&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=500',
    descLogin: '上约会圈 找线下',
    bgLogin: __DEF_IMG,
    // bgLogin: 'https://pic.rmb.bdstatic.com/bjh/down/VO71yj0jXIpiVpiH4RncQwcdb339b9cbdc38e7d07ffb138c8269f9.jpg?for=bg',
    userDefAvatarUrl: __DEF_AVATAR,
    // 'https://img2.baidu.com/it/u=1985709170,3830724062&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=500',
    userDefBackground: __DEF_IMG,
    index_banners: [
        <Media>{ url: __DEF_IMG }
    ],
    user_banners: [
        <Media>{ url: __DEF_IMG }
    ]
}

export const CONTACT_DEF = <User> {
    nickName: '苏朵朵',
    phone: '13576639986',
    avatarUrl: 'https://ww4.sinaimg.cn/mw690/008apmBfgy1hyd10ozzjnj30u00u0q4k.jpg',
    socialAccount: '13576639986',
    gender: 1, age: 22
}

// APP BAR
const __APP_BAR_INDEX = {
    tit: '首页', icon: 'alexa', icon_iive: 'alexa',
    path: 'pages/index/index',
    respond_standard_code: 'index',
    clazz_die: '', clazz_iive: 'app-bottom-bar-item-iive',
    func: () => { uniRouter.navigatorpg('index') }
}
const __APP_BAR_CARTS = {
    tit: '激情', icon: 'love', icon_iive: 'love',
    path: 'pages/love/love',
    respond_standard_code: 'love',
    clazz_die: '', clazz_iive: 'app-bottom-bar-item-iive',
    func: () => { uniRouter.navigatorpg('love') }
}
/*
const __APP_BAR_PUBLISH = {
    tit: '发布', icon: 'bag-add', icon_iive: 'bag-add',
    path: 'pages/publish/publish',
    respond_standard_code: 'publish',
    clazz_die: '', clazz_iive: 'app-bottom-bar-item-iive',
    func: () => { }
}
*/
const __APP_BAR_SHOP =     {
    tit: '商城', icon: 'cart', icon_iive: 'cart',
    path: 'pages/shop/shop',
    respond_standard_code: 'shop',
    clazz_die: '', clazz_iive: 'app-bottom-bar-item-iive',
    func: () => { uniRouter.navigatorpg('shop') }
}
const __APP_BAR_USER = {
    tit: '我的', icon: 'user', icon_iive: 'user-f',
    path: 'pages/user/user',
    respond_standard_code: 'user',
    clazz_die: '', clazz_iive: 'app-bottom-bar-item-iive',
    func: () => { uniRouter.navigatorpg('user') }
}
export const APP_BAR_NORMAL = <CoAppBottomBarItem[]> [
    __APP_BAR_INDEX, __APP_BAR_CARTS, __APP_BAR_SHOP, __APP_BAR_USER
]
export const APP_BAR_AUTHOR = <CoAppBottomBarItem[]> [
    __APP_BAR_INDEX, __APP_BAR_CARTS, __APP_BAR_SHOP, __APP_BAR_USER
]
export const GET_APP_BAR = (role: ROLES) => {
    if (role === 'AUTHOR' || role === 'ADMIN') {
        return APP_BAR_AUTHOR
    }
    return APP_BAR_NORMAL
}

// 缓存 KEY
export const APP_STORAGE_KEY = {
    AUTH: {
        SEEK: 'AUTH_LOGIN_SEEK',
        SPECIAL: 'AUTH_LOGIN_SPECIAL'
    }
}
